package zj.xinxin.api.moudle.article.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author junzhou
 * @date 2022/4/12 18:41
 * @since 1.8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ArticleVo implements Serializable {

    @ApiModelProperty(value = "发布日期")
    private LocalDateTime pushData;

    @ApiModelProperty(value = "发表用户")
    private String articleUser;

    @ApiModelProperty(value = "文章标题")
    @NotBlank(message = "文章标题不能为空！")
    private String title;

    @ApiModelProperty(value = "是否置顶")
    private String topFlag;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "文章摘要")
    private String articleSummary;

    @ApiModelProperty(value = "文章markdown内容")
    private String contentMd;

    @ApiModelProperty(value = "文章html内容")
    private String contentHtml;

    @ApiModelProperty(value = "文章类别")
    private CategoryVo category;

    @ApiModelProperty(value = "文章标签")
    private List<TagVo> tagList;
}
